function deepClone(obj) {
  //基础类型直接转换
  if (typeof obj === null || typeof obj !== 'object') {
    return obj
  }

  if (Array.isArray(obj)) {
    return obj.map(item => deepClone(item))
  }

  const cloned = {}
  for (const key in obj) {
    if (obj.hasOwnProperty(key)) {
      cloned[key] = deepClone(obj[key])
    }
  }
  return cloned
}

// 测试用例
const obj = { a: 1, b: { c: 2 } };
const cloned = deepClone(obj);
console.log(cloned.b === obj.b); // 应该输出 false